<template>
  <div class="propdel">
    <div class="header">
      <table>
        <tr>
          <td>
            <span style="margin-left: 20px; width: 80px">玩家id：</span>
            <el-input v-model="player_id" placeholder="请输入玩家id"></el-input>
          </td>
          <td>
            <span style="margin-left: 20px; width: 100px">玩家名称：</span>
            <el-input v-model="player_id" placeholder="请输入玩家名称"></el-input>
          </td>
          <td>
            <el-button type="primary" @click="search()">查询</el-button>
          </td>
        </tr>
      </table>
    </div>
    <div class="content">
      <el-main v-loading="loading">
        <el-table
          border
          :fit="true"
          :header-cell-style="{
            color: '#333',
            fontFamily: 'MicrosoftYaHeiUI',
            fontWeight: 500,
            fontSize: '16px',
          }"
          :data="tableData.slice((currentPage - 1) * pageSize,currentPage * pageSize)"
        >
          <el-table-column 
            sortable 
            prop="server_id" 
            label="服务器"
          >
          </el-table-column>
          <el-table-column 
            sortable 
            prop="player_id" 
            label="玩家ID"
          >
          </el-table-column>
          <el-table-column 
            sortable 
            prop="play_name" 
            label="玩家名称"
          >
          </el-table-column>
          <el-table-column
            header-align="center"
            align="center"
            width="200"
            label="操作"
          >
            <template slot-scope="scope">
              <el-button @click="propdel(scope.row)" type="primary">
                <i class="el-icon-edit"></i>删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <pageNation
          :total="tableData.length"
          :page-size="pageSize"
          @pageChange="pageChange"
          :page_index="currentPage"
        />
      </el-main>
    </div>
  </div>
</template>
<script>
import pageNation from "../../components/pagenation/pageNation";
export default {
  name: "Ban",
  components: { pageNation },
  data() {
    return {
      player_id: "",
      currentPage: 1, //当前页数
      pageSize: 10, //每页的数据
      tableData: [],
      loading: false,
    };
  },
  methods: {
    //分页
    pageChange(item) {
      this.currentPage = item.page_index;
      this.pageSize = item.page_limit;
    },
    //查询
    search() {
    },
    //解除封禁
    propdel(row) {
     
    },
  },
};
</script>
<style scoped>
.propdel {
  width: 100%;
  height: auto;
  background-color: #fff;
}
.propdel td {
  padding: 12px;
  font-size: 14px;
  display: flex;
  float: left;
}
</style>